{% extends "master.html" %}
{% block subtitle %} - 基础信息 - 店铺管理{% endblock %}


{% block main %}
<div class="container">
    <div class="row">
        <ul class="breadcrumb">
          <li><a href="{{url_for('bpMas.view')}}">基础信息</a> <span class="divider">\</span></li>
          <li class="active">店铺管理</li>
        </ul>
    </div>

    <div class="row">
        {{mymacros.render_search_form(form,3)}}
    </div>
    <div class="row">
        <div class="btn-toolbar pull-right">
            <div class="btn-group"><button type="button" class="btn" onclick="$('form').submit()">{{BTN_SEARCH}}</button></div>
            {% if getAllPermission(['SHOP_CREATE',])%}
                <div class="btn-group"><a href="{{url_for('bpShop.view',action='add')}}" class="btn btn-primary">创建店铺</a></div>
            {% endif %}
        </div>
    </div>
    <div class="row">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <td class="span2">系统编号</td>
                    <td>店铺名称</td>
                    <td class="span2">店铺类型</td>
                    <td class="span2">销售方式</td>
                    <td class="span2">创建人</td>
                    <td class="span2">创建时间</td>
                </tr>
            </thead>
            <tbody>
                {% for s,sp in result.items %}
                    <tr>
                        <td><a href="{{url_for('bpShop.view',action='view',id=s.id)}}">{{s.no}}</a></td>
                        <td>{{s.shortName}}</td>
                        <td>{{sp.shopType|ss(c='SPTP')}}</td>
                        <td>{{sp.saleType|ss(c='SPSLTP')}}</td>
                        <td>{{s.createBy|f}}</td>
                        <td>{{s.createTime|ft}}</td>
                    </tr>
                {% endfor %}
            </tbody>                
        </table>
       {{mymacros.mypaginate(result)}}
    </div>
</div>
{% endblock %}